1. Field of the Invention
The present invention relates generally to systems, methods and computer code products for a data processing system. More specifically, the present invention relates to systems, methods and computer code products for a data processing system using snapshot images of a file system to accurately backup temporary data files.
2. Description of the Related Art
Data processing systems often employ a snapshot module to facilitate data storage and retrieval operations. The snapshot module tracks writes to a data set on an active data storage device, creating a point-in-time instance of the data set. The active data storage device may be a memory such as the data processing system's memory, or a hard disk drive. The snapshot module creates the point-in-time instance of the data set of the active data storage device and uses the point-in-time instance to perform operations on the data set. For example, the snapshot module may mirror a point-in-time instance of the data set to an alternate data storage device by copying to the alternate data storage device only the data blocks of the data set that have been modified.
The snapshot module monitors and tracks the modified data blocks. The data processing device modifies data blocks of the data set stored on the active data storage device. The snapshot module tracks the data blocks of the data set that have been modified and creates a point-in-time instance of the modified data set. The snapshot module may store the point-in-time instance to the source data storage device by copying only the modified data blocks back to the source data storage device. As only modified data blocks are copied, the bandwidth required to store the data set is reduced.
File system snapshots thus establish a consistent block level image of the file system at a particular point-in-time. Employing the snapshot module allows backups of the active file system to be created. A snapshot copies the modified and deleted blocks that were in use in the file system at the point-in-time the snapshot was created in order to maintain the point-in-time image.
Unfortunately, storing multiple backup instances as snapshots may require additional data storage capacity that far exceeds the size of the data set that must be backed up, particularly if the data set is backed up frequently and if each backup instance is stored for an extended time. By including the snapshot module inside the file system, the number of input/output (I/O) operations to the snapshot module can be reduced. Furthermore, snapshot modules included within the file system can utilize an “inherit-on-delete” block management to reduce the redundant data sets that must be stored in a backup instance. Instead of deleting system blocks re-recording their contents in a snapshot, “inherit-on-delete” block management transfers ownership of deleted system blocks to the snapshot module rather than performing the duplicitous deletion and re-recordation of system blocks.
“Inherit-on-delete” block management has problems inheriting temporary files. A temporary file is a file for which there is a remaining reference (i_count>0) to the file location even after the file has been removed (i_nlink==0). Temporary files may still modify the pages of the file at the location that has been inherited by the snapshot while the reference remains on the temporary file. Therefore, the snapshot may not provide an accurate record of the inherited file at the point-in-time when the file was inherited. An open reference to the temporary file allows files at the referenced location to be altered, even after the location has been inherited by the snapshot.